<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<title>直连商户管理</title>
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<!-- 当前页面样式 -->
<link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
<!-- 当前页面样式 END -->
<style type="text/css">
.blue{
	color: blue
}
</style>
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<s:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
<script type="text/javascript">
$(document).ready(function(){
		$('#sub').click(function(){
			$("#queryForm").attr("action","<%=basePath%>/unpay/queryUnpay.ct");
			$("#queryForm").submit();
			$(this).attr("disabled","true");
		});
		$('#addMerinfo').click(function(){
			$("#queryForm").attr("action","<%=basePath%>/unpay/addInit.ct");
			$("#queryForm").submit();
			$(this).attr("disabled","true");
		});
		$('#exportlist').click(function(){
			$("#queryForm").attr("action","<%=basePath%>/unpay/exportInit.ct");
			$("#queryForm").submit();
			$(this).attr("disabled","true");
		});
		$('#updateMerinfo').click(function(){
			var dd = $("input[name=multi_sel]:checked");
			if(dd.length != 1){
				alert("请选择一条记录");
				return false;
			}
			var idd = dd.val();							
			if(dd.length == 0){
				alert("请选择记录");
				return false;
			}else{
				$("#updateMerinfo").attr("disabled",true);
				window.location.href='<%=basePath%>/unpay/updateInit.ct?unPay.id='+idd;
			}
		});
		
		$('#deleteMerinfo').click(function(){
			var dd = $("input[name=multi_sel]:checked");
			if(dd.length != 1){
				alert("请选择一条记录");
				return false;
			}
			var idd = dd.val();							
			if(dd.length == 0){
				alert("请选择记录");
				return false;
			}else{
				$("#deleteMerinfo").attr("disabled",true);
				window.location.href='<%=basePath%>/unpay/deleteInit.ct?unPay.id='+idd;
			}
		});
		
	});	
	
</script>
</head>

<body>
		<s:form id="queryForm" action="/freeze/queryFreeze.ct" method="post"
			theme="simple">
			<table class="tb">
				<tbody>
				<tr class="tb-line">
            		<td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
        		</tr>
				 <tr class="tb-line">
					<td class="tb-td" colspan="4">
						<div class="tb-h3">直连商户管理</div>
					</td>
				</tr>

				<tr class="tb-line">
				 	<td width="12%" style="min-width: 150px" align="right" class="tb-td">
				 	 <div class="tb-h4">商户号</div>
				 	 </td>
					<td class="tb-td">
                		<label class="tb-input-normal">
						<s:textfield  name="searchCondition.merchantNo" cssClass="queryWidth" />
							</label>
					</td>
					
					<td width="12%" style="min-width: 150px" align="right" class="tb-td">
				 	 <div class="tb-h4">终端号</div>
				 	 </td>
					<td class="tb-td">
                		<label class="tb-input-normal">
						<s:textfield  name="searchCondition.terminalNo" cssClass="queryWidth" />
							</label>
					</td>
				</tr>
					
				<tr class="tb-line">
					<td width="12%" style="min-width: 150px" align="right" class="tb-td">
				 	 <div class="tb-h4">结算帐号</div>
				 	 </td>
					<td class="tb-td">
                		<label class="tb-input-normal">
						<s:textfield  name="searchCondition.accountNo" cssClass="queryWidth" />
							</label>
					</td>
					
					<td width="12%" style="min-width: 150px" align="right" class="tb-td">
				 	 <div class="tb-h4">结算帐户名称</div>
				 	 </td>
					<td class="tb-td">
                		<label class="tb-input-normal">
						<s:textfield  name="searchCondition.accountName" cssClass="queryWidth" />
							</label>
					</td>
				</tr>
				<tr class="tb-line">
			        <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                	<div class="tb-h4">直连所属银行ID：</div>
            		</td>
            		<td class="tb-td">
                		<label class="tb-input-normal">
						<s:textfield  name="searchCondition.ylId" cssClass="queryWidth" />
							</label>
					</td>
					
					<td width="12%" style="min-width: 150px" align="right" class="tb-td">
                	<div class="tb-h4">添加日期：</div>
            		</td>
					<td class="tb-td">
                	<label class="tb-input-normal">
						<s:textfield  name="searchCondition.addTime" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true,wdate:true,errDealMode:0});"
							theme="simple" cssClass="queryWidth" />
					</label>
					</td>				
                								
				</tr>
				
				<tr>
						<td colspan="4" align="center"><span style="color: red"><s:actionerror /></span>
							<span style="color: red;"><s:actionmessage /></span > <span style="color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
				 <tr class="tb-line">
           		 <td class="tb-td line-submit" align="right" colspan="4">
                <label class="tb-input-submit"><input type="button" value="查询" id="sub"/></label>
				<label class="tb-input-submit"><s:reset value="取 消" /></label> 
				<label class="tb-input-submit"><input type="button" value="添加" id="addMerinfo"/></label>
				<label class="tb-input-submit"><input type="button" value="修改" id="updateMerinfo"/></label>
				<label class="tb-input-submit"><input type="button" value="删除" id="deleteMerinfo"/></label>
				<label class="tb-input-submit"><input type="button" value="导出" id="exportlist"/></label>	 
				</td>
				</tr>
				
				<s:if
					test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr class="tb-line">
						<td class="tb-td paging" colspan="4"><page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/unpay/queryUnpay.ct?currentPage=" />

						</td>
					</tr>
				</s:if>
			</table>
	</s:form>		
				
	<div class="big-tb">
    <table class="tb" style="width: 100%;">
				<thead>
            	<tr class="tb-line">
                <th class="tb-th" colspan="15"><div class="tb-h3">直连商户列表</div></th>
            	</tr>
					 <tr class="tb-line bg-gray">
					 	<s:if test="#request.searchRsList != null && #request.searchRsList.size>0">
                   			<th class="tb-th">选择</th>
                		</s:if>					 	
						<th class="tb-th">商户号</th>
						<th class="tb-th">终端号</th>				
						<th class="tb-th">T1手续费%</th>
						<th class="tb-th">T1手续费封顶（元）</th>
						<th class="tb-th">T0手续费%</th>
						<th class="tb-th">结算帐号</th>						
						<th class="tb-th">结算帐户名称</th>
						<th class="tb-th">结算银行</th>
						<th class="tb-th">联行号</th>
						<th class="tb-th">直连所属银行ID</th> 
						<th class="tb-th">添加日期</th>
						<th class="tb-th">操作员</th>
						<th class="tb-th">备注</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#request.searchRsList" status="stat" id="bean">
							<tr class="tb-line" >							
							<s:if test="#request.searchRsList != null && #request.searchRsList.size>0">
							<td class="tb-td" align="center">
                   			<input name="multi_sel" value="<s:property value="#bean.id"/>" type="checkbox" />
                   			</td>
                			</s:if>								
							<td class="tb-td"><s:property value="#bean.merchantNo"/></td>
							<td class="tb-td"><s:property value="#bean.terminalNo"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.feeT1"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.feeT1Top"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.feeT0"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.accountNo"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.accountName"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.bankName"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.bankCode"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.ylId"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.addTime"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.oper"/></td>
							<td class="tb-td" align="center"><s:property value="#bean.remark"/></td>
						</s:iterator>
						 
						 <s:if test="#request.msge!=null">
		                  <tr>
		                  <td  align='center' colspan='20'>
		                  		${msge}
		                  </td>
		                  </tr>
		                  
						
					   </s:if>
				</tbody>
			</table>
			</div>
		
	
</body>
</html>
